package com.muqi.app.qlearn.student.ui;

import com.muqi.app.qlearn.fragments.InteractiveFragment;
import com.muqi.app.qlearn.student.BaseFragmentActivity;
import com.muqi.app.qlearn.student.R;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;

public class InteractiveActivity extends BaseFragmentActivity {

	private int type;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_interactive);
	}

	@Override
	protected void onInit() {
		Intent intent = getIntent();
		type = intent.getIntExtra("type", 0);

		FragmentManager manager = getSupportFragmentManager();
		FragmentTransaction transaction = manager.beginTransaction();
		InteractiveFragment fragment = new InteractiveFragment();
		Bundle bundle = new Bundle();
		bundle.putInt("type", type);
		fragment.setArguments(bundle);
		transaction.add(R.id.reward_container, fragment);
		transaction.commit();
	}

	@Override
	protected void onData() {
		
	}
	
	public void onBack(View v){
		finish();
	}

}
